import React, {Component} from 'react'
import {Button} from "primereact/button";
import {Dialog} from "primereact/dialog";
import AddDialog from "../dialog/AddDialog";

export default class AddAddress extends Component {

    constructor() {
        super();
        this.state = {
            addAddressVisiable: false
        }
    }

    render() {
        return (
            <div className="pull-right">
                <Button label="添加地址本" onClick={() => this.setState({addAddressVisiable: true})}/>
                <Dialog header="添加地址本"
                        modal={true}
                        width="700px"
                        visible={this.state.addAddressVisiable}
                        onHide={() => this.setState({addAddressVisiable: false})}>
                    <AddDialog/>
                </Dialog>
            </div>
        )
    }
}